/**
*	详细信息页
**/
app.controller('gDetailCtrl', ['$scope', '$state', '$stateParams', '$http', '$window', 'utils',
  function($scope, $state, $stateParams, $http, $window, utils) {
    // id
    $scope.id = $stateParams.id;

    // 首页页面数据
    $scope.detailData = {
      loading: true
    }

    // 获取文章详细详细
    utils.get('artcileDetail', {
        random: Math.random(),
        id: $scope.id
    }).success(function (rs) {
      $scope.detailData = rs.data;
      $scope.detailData.loading = false;
    });

    // 后退
    $scope.goBack = function () {
      $window.history.back();
    }
  }
]);
